﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace zp.mk.Datensatz
{
    class Datensatz
    {
        String date;
        public String Date
        {
            get { return date; }
            set { date = value; }
        }

        String time;
        public String Time
        {
            get { return time; }
            set { time = value; }
        }

        String pnr;
        public String Pnr
        {
            get { return pnr; }
            set { pnr = value; }
        }

        String geselle;
        public String Geselle
        {
            get { return geselle; }
            set { geselle = value; }
        }

        Double gewicht;
        public Double Gewicht
        {
            get { return gewicht; }
            set { gewicht = value; }
        }

        public Datensatz(string date, string time, string pnr, string geselle, double gewicht)
        {
            this.Date = date;
            this.Time = time;
            this.Pnr = pnr;
            this.Geselle = geselle;
            this.Gewicht = gewicht;
        }

        public Datensatz(string row, char seperator)
        {
            string[] vals = row.Split(seperator);
            this.Date = vals[0];
            this.Time = vals[1];
            this.Pnr = vals[2];
            this.Geselle = vals[3];
            this.Gewicht = Int32.Parse(vals[4]);
        }

        public Datensatz()
        {
        }
    
    }
}
